#include<bits/stdc++.h>
using namespace std;

char a[105][105];

signed main() {
    memset(a, ' ', sizeof a);

    int n;
    cin >> n;

    string s;
    getchar();
    getline(cin, s);

    int num = 0;
    for(int i = 0; i < s.size(); i++) {
        a[num / n][i % n] = s[i];
        num++;
    }

    for(int j = 0; j < n; j++) {
        for(int i = (num - 1) / n; i >= 0; i--) {
            cout << a[i][j];
        }
        cout << "\n";
    }

    return 0;
}

